/**
 * Copyright &copy; 2012-2016 civet All rights reserved.
 */
package com.civet.myadmin.modules.goods.entity;

import com.civet.myadmin.modules.sys.entity.Area;
import org.hibernate.validator.constraints.Length;

import com.civet.myadmin.common.persistence.DataEntity;

/**
 * 商品信息Entity
 * @author Jockey
 * @version 2016-11-20
 */
public class GoodsObj extends DataEntity<GoodsObj> {
	
	private static final long serialVersionUID = 1L;
	private String goodsName;		// 商品名称
	private String goodsNo;		// 商品货号
	private Integer stock;		// 商品库存
	private String intro;		// 商品描述
	private Double costPrice;		// 成本价
	private Double marketPrice;		// 市价
	private Double salePrice;		// 售价
	private String images;		// 商品图片
	private String supplier;		// 供货商
	private String supplierTel;		// 供货电话
	private Integer categoryId;		// 分类编号

	private GoodsCategory goodsCategory = new GoodsCategory();

	private GoodsCategory parent;	// 父级菜单
	private String parentIds; // 所有父级编号

	public GoodsObj() {
		super();
	}

	public GoodsObj(Integer id){
		super(id);
	}

	@Length(min=1, max=50, message="商品名称长度必须介于 1 和 50 之间")
	public String getGoodsName() {
		return goodsName;
	}
	public void setGoodsName(String goodsName) {
		this.goodsName = goodsName;
	}
	
	@Length(min=0, max=50, message="商品货号长度必须介于 0 和 50 之间")
	public String getGoodsNo() {
		return goodsNo;
	}
	public void setGoodsNo(String goodsNo) {
		this.goodsNo = goodsNo;
	}
	
	public Integer getStock() {
		return stock;
	}
	public void setStock(Integer stock) {
		this.stock = stock;
	}
	
	@Length(min=1, max=1000, message="商品描述长度必须介于 1 和 1000 之间")
	public String getIntro() {
		return intro;
	}
	public void setIntro(String intro) {
		this.intro = intro;
	}
	
	public Double getCostPrice() {
		return costPrice;
	}
	public void setCostPrice(Double costPrice) {
		this.costPrice = costPrice;
	}
	
	public Double getMarketPrice() {
		return marketPrice;
	}
	public void setMarketPrice(Double marketPrice) {
		this.marketPrice = marketPrice;
	}
	
	public Double getSalePrice() {
		return salePrice;
	}
	public void setSalePrice(Double salePrice) {
		this.salePrice = salePrice;
	}
	
	@Length(min=0, max=1000, message="商品图片长度必须介于 0 和 1000 之间")
	public String getImages() {
		return images;
	}
	public void setImages(String images) {
		this.images = images;
	}
	
	@Length(min=0, max=50, message="供货商长度必须介于 0 和 50 之间")
	public String getSupplier() {
		return supplier;
	}
	public void setSupplier(String supplier) {
		this.supplier = supplier;
	}
	
	@Length(min=0, max=50, message="供货电话长度必须介于 0 和 50 之间")
	public String getSupplierTel() {
		return supplierTel;
	}
	public void setSupplierTel(String supplierTel) {
		this.supplierTel = supplierTel;
	}
	
	public Integer getCategoryId() {
		return categoryId;
	}
	public void setCategoryId(Integer categoryId) {
		this.categoryId = categoryId;
	}

	public GoodsCategory getParent() {
		return parent;
	}
	public void setParent(GoodsCategory parent) {
		this.parent = parent;
	}

	public String getParentIds() {
		return parentIds;
	}
	public void setParentIds(String parentIds) {
		this.parentIds = parentIds;
	}

	public GoodsCategory getGoodsCategory() {
		return goodsCategory;
	}
	public void setGoodsCategory(GoodsCategory goodsCategory) {
		this.goodsCategory = goodsCategory;
	}
}